home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / btnc200 / general.h < prev    next >
Text File  |  1996-09-05  |  3KB  |  191 lines

  1. /*
  2. **    Program:    BTNC
  3. **
  4. **    Module:        General definitions
  5. */
  6.  
  7. #define    NewAtom(x)    calloc(1L, sizeof(x))
  8. #define Last(s)    s[strlen(s)-1]
  9. #define    HB        (BYTE)(1<<7);
  10.         
  11.  
  12. #define    VERSION        "1.86"
  13. #define    CTRL_Z        26
  14.  
  15. /*
  16. ** Allowed fist characters on line
  17. */
  18.  
  19. #define    LEGAL_CHARS ",ZzRrHhPpDd"
  20.  
  21. /*
  22. **    Returncodes of ParseLine()
  23. */
  24.  
  25. #define    OK            0
  26. #define    DOWN        1
  27. #define    ABORT        2
  28. #define    SKIP        3
  29.  
  30. /*
  31. **    General structs
  32. */
  33.  
  34. typedef struct _ADDRESS
  35. {
  36.     UWORD            zone, net, node, point;
  37.     
  38.     struct _ADDRESS    *next;
  39. } ADDRESS;
  40.  
  41. typedef struct _ADDLIST
  42. {
  43.     UWORD            tozone,
  44.                     toregion;
  45.                     
  46.     BYTE            listfile[80];
  47.  
  48. /* Modified ---------------------------------- */
  49.  
  50.     BOOLEAN        dimension4; 
  51.     BOOLEAN        new_3D_format;
  52.     
  53. /*-------------------------------------------- */    
  54.     struct _ADDLIST    *next;
  55. } ADDLIST;
  56.  
  57. typedef struct _POINTLIST
  58. {
  59.     ADDRESS            boss;
  60.     
  61.     BYTE            listfile[80];
  62.     
  63.     struct _POINTLIST    *next;
  64. } POINTLIST;
  65.  
  66. /*
  67. **    DOMAINS.BNL
  68. */
  69.  
  70. #define    MULTIZONE        0
  71.  
  72. typedef struct _DOMAIN
  73. {
  74.     BYTE            name[13],
  75.                     listfile[13];
  76.     
  77.     UWORD            zone;
  78.     
  79.     ULONG            startoffset,
  80.                     length;
  81. } DOMAIN;
  82.  
  83. /*
  84. **    INDEX.BNL
  85. */
  86.  
  87. #define    ZC            6
  88. #define    RC            5
  89. #define    HOST        4
  90. #define    HUB            3
  91. #define    NODE        2
  92. #define    POINT        1
  93.  
  94. typedef struct _INDEX
  95. {
  96.     BYTE            type;
  97.     UWORD            value;
  98. } INDEX;
  99.  
  100. typedef struct _CINDEX
  101. {
  102.     BYTE            type;
  103.     UWORD            value;
  104.     ULONG            offset;
  105. } CINDEX;
  106.  
  107. /*
  108. **    NODEINFO.BNL
  109. **
  110. **    Modemtypes
  111. */
  112.  
  113. #define    HST        (1 << 0)
  114. #define    PEP        (1 << 1)
  115. #define    MNP        (1 << 2)
  116. #define    V32        (1 << 3)
  117. #define    V32B    (1 << 4)
  118. #define    V42        (1 << 5)
  119. #define    V42B    (1 << 6)
  120. #define H16        (1 << 7)
  121. #define    ZYX        (1 << 8)
  122. #define Z19        (1 << 9)
  123. #define    V32T    (1 << 10)
  124. #define V34        (1 << 11)
  125. #define ISDNA    (1 << 12)
  126. #define ISDNB    (1 << 13)
  127. #define ISDNC    (1 << 14)
  128. #define    MAX        (1 << 15)
  129.  
  130. /*
  131. **    System flags
  132. */
  133.  
  134. #define    MAILONLY    1U
  135. #define    CM            2U
  136. #define    NOARCMAIL    4U
  137. #define    UNDIALABLE    8U
  138.  
  139. #define    BARKREQ        16U
  140. #define    BARKUPDREQ    32U
  141. #define    WAZOOREQ    64U
  142. #define    WAZOOUPDREQ    128U
  143.  
  144. #define    PRIVATE        256U
  145. #define    HOLD        512U
  146.  
  147. typedef struct _SYSTEM
  148. {
  149.     BYTE            sysname[34],
  150.                     location[30],
  151.                     operator[30],
  152.                     phone[40];
  153.     
  154.     UWORD            hubnode;
  155.     
  156.     BYTE            maxbaud;        /*    Baud/300    */
  157.     WORD            modemtype;
  158.     
  159.     UWORD            flags;
  160. } SYSTEM;
  161.  
  162. /*
  163. ** Compressed system entry
  164. */
  165.  
  166. typedef struct _CSYSTEM
  167. {
  168.     UWORD            length;
  169.  
  170.     UWORD            hubnode;
  171.     
  172.     BYTE            maxbaud;        /*    Baud/300    */
  173.     WORD            modemtype;
  174.     
  175.     UWORD            flags;
  176.  
  177.     BYTE            code[134];
  178.  
  179. } CSYSTEM;
  180.  
  181. /*
  182. **    Local domain specification
  183. */
  184.  
  185. typedef struct _DOMAINSPEC
  186. {
  187.     DOMAIN            dat;
  188.     
  189.     struct _DOMAINSPEC    *next;
  190. } DOMAINSPEC;
  191.